﻿<%@ Page Language="C#" MasterPageFile="../../MasterPage.Master" AutoEventWireup="true" CodeBehind="ICM_Inventory_Control.aspx.cs" Inherits="KPIS.GERP.GIMS.APP.APP_UI.Form.ICM_Inventory_Control" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="server">
       <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
        <script type="text/javascript" src="../../Scripts/Common.js"></script>
            <script type="text/javascript">
                 function onTextChangeGeneral(sender) {
                    if (sender.get_value() == "") {
                        sender.set_text("");
                    }
                }
            </script>
       </telerik:RadCodeBlock>   
      <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
                    <AjaxSettings>
                        <%--<telerik:AjaxSetting AjaxControlID="Panel1">
                            <UpdatedControls>
                                <telerik:AjaxUpdatedControl ControlID="Panel1" LoadingPanelID="RadAjaxLoadingPanel1" />
                            </UpdatedControls>
                        </telerik:AjaxSetting>--%>
                    </AjaxSettings>    
    </telerik:RadAjaxManager>
    <div class="moduleContent1000">
              <div class="moduleDivBottom1000">
                 <asp:Panel ID="Panel1" runat="server" CssClass="contentPaneDiv" Height="400px" ScrollBars="Auto" align = "center" >    
                           <div class="header-grid" align="left">
                                <asp:Label ID="lblTitle" runat="server" Text="ทะเบียนคุมพัสดุ"></asp:Label>
                           </div>
                           <asp:Panel runat ="server" ID="PanelCombo">
                                    <table>
                                           <tr>
                                                  <td>
                                                             <asp:Label ID="lblInventoryCode" runat = "server" Text ="รหัสพัสดุ" />
                                                  </td>
                                                  <td>
                                                             <%--<telerik:RadComboBox ID="cmbInventoryCode" Runat="server"  AutoPostBack="true" OnSelectedIndexChanged="cmbInventoryCode_OnSelectedIndexChanged">
                                                             </telerik:RadComboBox>--%>
                                                             <telerik:RadComboBox ID="cmbInventoryCode" runat="server" DataTextField="icm_res_item_name"
                                                                 DataValueField="icm_res_item_seq" EnableLoadOnDemand="true" ShowMoreResultsBox="true"
                                                                 EnableVirtualScrolling="true" EmptyMessage="< เลือกประเภทวัสดุ >" AllowCustomText="true"
                                                                 Filter="Contains" OnClientTextChange="onTextChangeGeneral" OnItemsRequested="cmbInventoryCode_ItemsRequested"
                                                                 Width="450px" title="เลือกประเภทวัสดุ">
                                                             </telerik:RadComboBox>
                                                             &nbsp;<label id="Label15" runat="server"><font color="red">*</font></label>
                                                  </td>
                                           </tr>
                                    </table>
                          </asp:Panel> 
                           <table>
                              <tr>
                                 <td>
                                        <telerik:RadGrid ID="grdInventoryControl" runat="server" AutoGenerateColumns="false"
                                                        AllowMultiRowEdit="false" AllowMultiRowSelection="true" ShowStatusBar="true"
                                                        Width="945px" Height="299px" AllowPaging="true" AllowFilteringByColumn="true"
                                                        GroupingSettings-GroupByFieldsSeparator="&nbsp;&nbsp;&nbsp;&nbsp;"
                                                        GroupingSettings-GroupContinuedFormatString=""
                                                        GroupingSettings-GroupContinuesFormatString=""
                                                        GroupingSettings-GroupSplitFormat=""
                                                        OnNeedDataSource="grdInventoryControl_NeedDataSource" align ="left">
                                                        <MasterTableView AllowMultiColumnSorting="True" CellSpacing="-1" GroupLoadMode="Client"
                                                            DataKeyNames="icm_receive_seq" NoMasterRecordsText="< ไม่มีข้อมูล >" GroupsDefaultExpanded="true">
                                                            <RowIndicatorColumn>
                                                                <HeaderStyle Width="20px" />
                                                            </RowIndicatorColumn>
                                                            <ExpandCollapseColumn>
                                                                <HeaderStyle Width="20px" />
                                                            </ExpandCollapseColumn>
                                                            <Columns>   
                                                                <telerik:GridBoundColumn DataField="icm_receive_seq" 
                                                                    HeaderText="icm_receive_seq" UniqueName="icm_receive_seq"
                                                                    FilterControlWidth="100%" AutoPostBackOnFilter="true" 
                                                                    CurrentFilterFunction="Contains" ShowFilterIcon="false" Visible="false" 
                                                                    HeaderStyle-Font-Bold="true" HeaderStyle-HorizontalAlign="Center">
                                                                </telerik:GridBoundColumn>
                                                                <telerik:GridBoundColumn DataField="receive_date" 
                                                                    HeaderText="วันที่รับเข้า" UniqueName="receive_date"
                                                                    FilterControlWidth="100%" AutoPostBackOnFilter="true" AllowFiltering = "true"
                                                                    HeaderStyle-Width="120px" DataFormatString = "{0:D}"
                                                                    CurrentFilterFunction="Contains" ShowFilterIcon="false"
                                                                    HeaderStyle-Font-Bold="true" HeaderStyle-HorizontalAlign="Center">
                                                                </telerik:GridBoundColumn>
                                                                <telerik:GridBoundColumn DataField="res_item_name" 
                                                                    HeaderText="รายการพัสดุ" UniqueName="res_item_name" 
                                                                    FilterControlWidth="100%" AutoPostBackOnFilter="true"
                                                                    CurrentFilterFunction="Contains" ShowFilterIcon="false" 
                                                                    HeaderStyle-Font-Bold="true" HeaderStyle-HorizontalAlign="Center">
                                                                </telerik:GridBoundColumn>
                                                                <telerik:GridBoundColumn DataField="quantity" 
                                                                    HeaderText="จำนวน" UniqueName="quantity" HeaderStyle-Width="120px"
                                                                    FilterControlWidth="100%" AutoPostBackOnFilter="true"
                                                                    CurrentFilterFunction="Contains" ShowFilterIcon="false" 
                                                                    HeaderStyle-Font-Bold="true" HeaderStyle-HorizontalAlign="Center">
                                                                </telerik:GridBoundColumn>
                                                                <telerik:GridBoundColumn DataField="unit_name" 
                                                                    HeaderText="หน่วย" UniqueName="unit_name" HeaderStyle-Width="120px"
                                                                    FilterControlWidth="100%" AutoPostBackOnFilter="true"
                                                                    CurrentFilterFunction="Contains" ShowFilterIcon="false" 
                                                                    HeaderStyle-Font-Bold="true" HeaderStyle-HorizontalAlign="Center">
                                                                </telerik:GridBoundColumn>
                                                                <telerik:GridBoundColumn DataField="receive_type_name" HeaderStyle-Width="180px"
                                                                    HeaderText="ชื่อประเภทการรับเข้า" UniqueName="receive_type_name"
                                                                    FilterControlWidth="100%" AutoPostBackOnFilter="true"
                                                                    CurrentFilterFunction="Contains" ShowFilterIcon="false" 
                                                                    HeaderStyle-Font-Bold="true" HeaderStyle-HorizontalAlign="Center">
                                                                </telerik:GridBoundColumn>
                                                                <telerik:GridBoundColumn DataField="location_name" 
                                                                    HeaderText="สถานที่รับเข้า" UniqueName="location_name" HeaderStyle-Width="180px"
                                                                    FilterControlWidth="100%" AutoPostBackOnFilter="true"
                                                                    CurrentFilterFunction="Contains" ShowFilterIcon="false" 
                                                                    HeaderStyle-Font-Bold="true" HeaderStyle-HorizontalAlign="Center">
                                                                </telerik:GridBoundColumn>
                                                            </Columns>
                                                            <PagerStyle Mode="NumericPages" AlwaysVisible="true" 
                                                                FirstPageToolTip="กลับหน้าแรก" LastPageToolTip="ไปหน้าสุดท้าย" 
                                                                NextPagesToolTip="หน้าถัดไป" NextPageToolTip="หน้าถัดไป" 
                                                                PrevPagesToolTip="ย้อนกลับ" PrevPageToolTip="ย้อนกลับ" />
                                                            </MasterTableView>
                                                <GroupingSettings GroupByFieldsSeparator="&nbsp;&nbsp;&nbsp;&nbsp;" 
                                                    GroupContinuedFormatString="" GroupContinuesFormatString="" 
                                                    GroupSplitFormat="" />
                                                <ClientSettings EnableRowHoverStyle="True">
                                                    <Selecting AllowRowSelect="true" />
                                                    <Scrolling AllowScroll="true" UseStaticHeaders="true" />
                                                </ClientSettings>
                                            </telerik:RadGrid> 
                                     </td>
                             </tr>
                       </table>
                  </asp:Panel>
             </div>
         </div>                    
</asp:Content>    
